package com.codejoys.monitor.web;

import com.codejoys.monitor.dto.BaseResult;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/schedule")
public class ScheduleController {

    @GetMapping("/stop")
    public BaseResult stopSchedule(){
        // sysSchedulers.start()

        return BaseResult.success();
    }

    @GetMapping("/start")
    public BaseResult startSchedule(){

        return BaseResult.success();
    }

    @GetMapping("/list")
    public BaseResult listSchedules() throws JsonProcessingException {

        return BaseResult.builder().build();
    }
}
